package api;

import api.betfairAPI.BetfairMarket;

import java.util.Collection;

/**
 * User: Darren
 * Date: 3/02/13
 * Time: 8:25 PM
 */
public interface Market<T extends Market.Runner> {

    String getMarketName();
    int getMarketId();
    String getExchangeName();
    int getExchangeId();

    String getStartTime();
    String getStatus();
    String getCountry();
    String getCurrency();

    Collection<T> getRunners();

    public abstract class Runner {
        public abstract int getSelectionId();
        public abstract String getName();
        public abstract double getTotalAmountMatched();
        public abstract double getLastPriceMatched();
        public abstract int getLayPricesSize();
        public abstract int getBackPricesSize();
        public abstract Price getLayPrice(int idx);
        public abstract Price getBackPrice(int idx);
    }

    public interface Price {
        double getPrice();
        double getAmountAvailable();
    }
}
